<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>质保信息录入</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/static/index/css/add_car.css">
</head>
<body>
<div class="container">
    <img src="/static/index/images/logo.png" class="logo">
    <div class="main">
        <h1 class="title">质保信息录入</h1>

        <form class="form" action="/index/index/addInformation" method="post">
            <div class="form-item">
                <label for="license_plate">车牌</label>
                <input type="text" id="license_plate" name="license_plate" placeholder="请输入车牌">
            </div>

            <div class="form-item">
                <label for="vin">车架号</label>
                <input type="text" id="vin" name="vin" placeholder="请输入车架号">
            </div>

            <div class="form-item">
                <label for="car_model">车型</label>
                <input type="text" id="car_model" name="car_model" placeholder="请输入车型">
            </div>

            <div class="form-item">
                <label for="year">年份</label>
                <select id="year" name="year">
                    <option value="">请选择年份</option>
                    {for start="2010" end="2025"}
                    <option value="{$i}">{$i}</option>
                    {/for}
                </select>
            </div>

            <div class="form-item">
                <label for="machine_model">机器型号</label>
                <input type="text" id="machine_model" name="machine_model" placeholder="请输入机器型号">
            </div>

            <div class="form-item">
                <label for="serial_number">防伪流水号</label>
                <input type="text" id="serial_number" name="serial_number" placeholder="请输入防伪流水号">
            </div>

            <div class="form-item">
                <label for="customer_name">客户姓名</label>
                <input type="text" id="customer_name" name="customer_name" placeholder="请输入客户姓名">
            </div>

            <div class="form-item">
                <label for="contact_info">联系方式</label>
                <input type="tel" id="customer_mobile" name="customer_mobile" placeholder="请输入联系方式">
            </div>

            <div class="form-item">
                <label for="installation_store">安装门店</label>
                <input type="text" id="shop_id" value="{$shop_name}" readonly>
            </div>

            <div class="form-item">
                <label for="installation_date">安装日期</label>
                <input type="date" id="installation_date" name="installation_date">
            </div>

            <div class="form-item">
                <button type="submit" class="submit-btn">提交</button>
            </div>
            <a href="javascript:void(0)" class="logout-btn">退出</a>
        </form>
    </div>
</div>
</body>
<script src="/static/jquery/jquery-3.1.1.min.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script src="/static/index/js/common.js"></script>
<script>
    $('.logout-btn').click(function () {
        $.post({
            url: '/index/index/logout',
            success: res => {
                var res = JSON.parse(res);
                if (res.result == 1) {
                    window.location.href = '/index/index/login'
                }
            }
        })
    })
</script>
</html>
